package com.phillong.decorator.jdk;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author zhangpeng
 */
public class LowerCaseInputStreamTest {

    public static void main(String[] args) {
        int c;
        try {
            InputStream in = new LowerCaseInputStream(new BufferedInputStream(new FileInputStream("/Users/zhangpeng/Desktop/Code/StudyProgram/java-design-pattern/test.txt")));
            while ((c = in.read()) >= 0){
                System.out.println((char) c);
            }
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
